package com.ht.file.service.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ht.file.dao.FileDirectoryDao;
import com.ht.file.entity.FileDirectory;
import com.ht.file.service.FileDirectoryService;


public class FileDirectoryServiceImpl implements FileDirectoryService {
	
	private FileDirectoryDao fileDirectoryDao;

	public FileDirectoryDao getFileDirectoryDao() {
		return fileDirectoryDao;
	}

	public void setFileDirectoryDao(FileDirectoryDao fileDirectoryDao) {
		this.fileDirectoryDao = fileDirectoryDao;
	}

	@Override
	public void addFileDirectory(FileDirectory fileDirectory) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public FileDirectory fileDirectory(String fileDirectoryCode) {
		// TODO Auto-generated method stub
		return fileDirectoryDao.get(FileDirectory.class, fileDirectoryCode);
	}

	@Override
	public List<FileDirectory> fileDirectoryList() {
		// TODO Auto-generated method stub
		return fileDirectoryDao.fileDirectoryList();
	}

	@Override
	public List<FileDirectory> fileDirectoryChildList(String fileDirectoryParentCode) {
		// TODO Auto-generated method stub
		return fileDirectoryDao.fileDirectoryChildList(fileDirectoryParentCode);
	}

	@Override
	public void updateFileDirectory(FileDirectory fileDirectory) {
		// TODO Auto-generated method stub
		fileDirectoryDao.updateFileDirectory(fileDirectory);
	}

	@Override
	public void deleteFileDirectory(FileDirectory fileDirectory) {
		// TODO Auto-generated method stub
		fileDirectoryDao.deleteFileDirectory(fileDirectory);
	}
	
//	private List<Map<String,String>> getList(List<FileDirectory> fileDirectoryList){
//		List<Map<String,String>> list = new ArrayList<Map<String,String>>();
//		for(FileDirectory fileDirectory : fileDirectoryList){
//			Map<String,String> map = new HashMap<String,String>();
//			map.put("directoryCode", fileDirectory.getDirectoryCode());
//			map.put("directoryName",fileDirectory.getDirectoryName());
//			map.put("directoryParentCode",fileDirectory.getDirectoryParentCode());
//			list.add(map);
//		}
//		return list;
//	}
	
	
}
